package com.example.exceptions;

import com.example.demo.entity.enums.CodeEnum;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.criteria.CriteriaBuilder;


@Getter
@Setter
public class RException extends RuntimeException{

    private Integer code;

    public RException(Integer code,String msg){
        super(msg);
        this.code=code;
    }

    public RException(CodeEnum codeEnum){
        super(codeEnum.getMsg());
        this.code=codeEnum.getCode();
    }



}
